<template>
  <a-modal :open="open" width="600px" title="质控检测结果" :footer="false" centered @cancel="onCancel">
    <BaseTable :loading="loading" :columns="columns" :data-source="tableData" bordered :height="280" :pagination="false">
      <template #bodyCell="{ column, index }">
        <template v-if="column.dataIndex === 'xh'">
          <div>{{ index + 1 }}</div>
        </template>
      </template>
    </BaseTable>
  </a-modal>
</template>
<script setup>
import { ref } from 'vue'
// import dayjs from 'dayjs'
// import { message } from 'ant-design-vue'
import BaseTable from '@/components/BaseTable'
// import useUserStore from '@/store/user'
// import { post, get } from '@/utils/request'

// const { empId } = useUserStore()

const emit = defineEmits(['update:open', 'success'])
defineProps({
  open: Boolean,
  rowData: {
    type: Object,
    default: () => ({})
  }
})

const columns = ref([
  { title: '序号', dataIndex: 'xh', width: 60 },
  { title: '名称', dataIndex: 'name' },
  { title: '问题描述', dataIndex: 'memo' }
])

// const formState = ref({})
const tableData = ref([
  {
    name: '医疗机构',
    memo: '必填'
  },
  {
    name: '组织机构代码',
    memo: '必填'
  },
  {
    name: '入院时间',
    memo: '必填'
  },
  {
    name: '入院时间',
    memo: '入院时间不正确，大于出院时间'
  }
])

// const { loading } = useTable({
//   url: '/outp/mzdj/getOutpRecordInfoList',
//   immediate: true,
//   params: formState.value
// })

const onCancel = () => {
  emit('update:open', false)
}
</script>

<style lang="less" scoped></style>
